<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<meta name="decorator" content="sysDefault" />
<script
	src="${staticPath}/lib/jquery-datatables/1.9.4/js/jquery.dataTables.min.js"
	type="text/javascript"></script>
<script type="text/javascript"
	src="${staticPath}/lib/jquery/1.10.2/jquery.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
	});
	function funform(url, target) {
		window.open(url, target);
	}
</script>
</head>
<body>
	<div class="container-fluid">
		<div class="row">
			<div class="col-xs-12">
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title">
							省州信息管理列表
							<button class="btn btn-success btn-sm pull-right"
								onclick="funform('${contextPath}/sys/base/state/addState','_self');">新增</button>
						</h3>
					</div>

					<form:form id="dataForm"  name="listForm" modelAttribute="sysBaseState"
						action="${contextPath}/sys/base/state/getStateList"
						class="navbar-form navbar-left" role="search" method="get">
						<div class="form-group">
							<form:input path="name" class="form-control" placeholder="省州名称" />
						</div>
						<div class="form-group">
							<form:input path="code" class="form-control" placeholder="省州编码" />
						</div>
						<div class="form-group">
							<form:input path="countryCode" class="form-control" placeholder="所属国家代码" />
						</div>
						<button class="btn btn-primary" type="submit">查询</button>
					</form:form>
					<tags:message content="${message}" />
					<table class="table table-striped table-bordered table-hover">
						<thead>
						</thead>
						<thead>
							<tr>
								<th>省州名称</th>
								<th>省州编码</th>
								<th>创建时间</th>
								<th>国家编码</th>
								<th>国家名称</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach var="state" items="${page.list}" varStatus="i">
								<tr>
									<td>${state.name}</td>
									<td>${state.code}</td>
									<td><fmt:formatDate value="${state.createTime}"
											pattern="yyyy-MM-dd " /></td>
									<td>${state.countryCode}</td>
									<td>${state.countryName}</td>
									<td><a
										href="${contextPath}/sys/base/state/viewState?code=${state.code}&countryName=${state.countryName}">查看</a>
										<a
										href="${contextPath}/sys/base/state/updateState?code=${state.code}&countryName=${state.countryName}">修改</a>
										<a
										href="${contextPath}/sys/base/state/removeState?code=${state.code}&countryName=${state.countryName}"
										onclick="return Oosp_Confirm('确认要删除该条数据吗？', this.href)">删除</a>
									</td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
					<div class="panel-footer">
						<pager:pager pageSize="${page.pageSize}" pageNo="${page.pageNo}"
							url="" total="${page.total}" />
						<script type="text/javascript" src="${staticPath}/js/list.js"></script>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>